﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Infrastructure.Crosscutting.Authorize
{
    public interface IMvcRolePermissionService
    {
        Domain.Entity.MvcRolePermission Add(Domain.Entity.MvcRolePermission per, Domain.Entity.User operUser);

        bool Delete(Domain.Entity.MvcRolePermission per, Domain.Entity.User operUser);

        bool DeleteTrue(Domain.Entity.MvcRolePermission per, Domain.Entity.User operUser);

        bool Delete(IList<int> idList, Domain.Entity.User operUser);

        bool DeleteTrue(IList<int> idList, Domain.Entity.User operUser);

        bool Modify(Domain.Entity.MvcRolePermission per, Domain.Entity.User operUser);

        Domain.Entity.MvcRolePermission Get(int id);

        IQueryable<Domain.Entity.MvcRolePermission> GetList();


        /// <summary>
        /// Gets the role permission by role id.
        /// permission service used
        /// </summary>
        /// <param name="roleId">The role id.</param>
        /// <returns></returns>
        IQueryable<Domain.Entity.MvcRolePermission> GetRolePermissionByRoleId(int roleId);

        List<Infrastructure.Crosscutting.Authorize.Dto.MvcActionDto> GetRoleInstallPermissionByRoleId(int roleId);

        List<Infrastructure.Crosscutting.Authorize.Dto.MvcActionDto> GetRoleUninstallPermissionByRoleId(int roleId);
    }
}
